package com.songshuai.webapi.baseapi.pojo.feign.request;

import com.songshuai.webapi.baseapi.constant.BaseConstant;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

/**
 * @Author:wbl
 * @Date: 2019/1/3
 */
@Data
public class MasterNumberParamReqDto {

    @NotBlank(message = "记录数字类型不能为空")
    private String numberType;
    @NotBlank(message = "记录数key值不能为空")
    private String numberKey;
    //初始值
    private Integer initNum;
    public Integer getInitNum(){
        if(initNum != null){
            return initNum;
        }
        return BaseConstant.DEFAULT_INIT_NUMBER;
    }
    //备注
    private String remark;
    //默认补充长度
    private Integer numLen;
    public Integer getNumLen(){
        if(numLen != null){
            return numLen;
        }
        return BaseConstant.DEFAULT_INIT_LENGTH;
    }
    //登录人id
    @NotNull(message = "登录人不能为空")
    private Integer loginId;
}
